<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><spring:message code="family.login.jsp.title"/></title>
<script type="text/javascript" src="<%=basePath%>js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.validate.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.form.js"></script>
<link href="css/home_css/home.css" rel="stylesheet" type="text/css" />
<link href="css/login_css/login.css" rel="stylesheet" type="text/css" />
<link href="css/login_css/public.css" rel="stylesheet" type="text/css" />
<link href="css/index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	$(function(){
		$("#loginImg").click(function(){
			$("#loginForm").submit();
		});
		$("#createHome").click(function(){
			window.location.href="enterRegister.ajax";
		});
		$("#login_login_button").mouseover(function(){
			$(this).css("background-image","url('images/enter_hover.jpg')");
		}).mouseout(function(){
			$(this).css("background-image","url('images/enter.jpg')");
		});
		
		$("#createHome").mouseover(function(){
			$(this).css("background-image","url('images/up_hover.jpg')");
		}).mouseout(function(){
			$(this).css("background-image","url('images/up.jpg')");
		});
	});
	
	function lianXuan(){
		if($("#checkbox").attr("checked")==true){
			$("#checkbox").attr("checked","");
		}else{
			$("#checkbox").attr("checked","true");
		}
	}
	
	function submitJames(){
		if($("#loginName").val()=="" || $("#loginName").val()=="用门牌号/邮箱/手机号登录"){
			$("#loginName").focus();
			$("#loginError").html("请输入门牌号或邮箱地址");
			return false;
		}else if($("#loginPwd").val()==""){
			$("#loginPwd").focus();
			$("#loginError").html("请输入密码");
			return false;
		}else{
			return true;
		}
	}
	
	function laiLe(){
		if($("#loginName").val()=="用门牌号/邮箱登录" && $("#loginName").attr("class")=="james"){
			$("#loginName").attr("class","inputText");
			$("#loginName").val("");
		}
	}
	
	function zouBa(){
		if($("#loginName").val()=="" && $("#loginName").attr("class")=="inputText"){
			$("#loginName").attr("class","james");
			$("#loginName").val("用门牌号/邮箱登录");
		}
	}
	
	function select(){
		$("#loginPwd").select();
	}
	
</script>
<style type="text/css">
	.ValidationErrors{
		color: red;
		font-size: 12px;
	}
	.james{
		color: gray;
		font-size: 13px;
	    height: 28px;
	    line-height: 28px;
	    width: 158px;
	}
</style>
</head>

<body>
	<div class="box">

		<div class="head">
			<div class="logo">
				<img src="images/login_images/login_logo.gif" />
			</div>
			<div class="login_enter">
				<a href="enterRegister.ajax" title="注册">建家（注册）</a><%-- | 帮助  --%> 
			</div>
			<div class="clear"></div>
		</div>
	</div>
	<div id="content">
		<div class="index_bj">
			<div class="box">
				<div class="index_content">
					<div class="index_hd">
						<div class="index_title">家庭生活的助手和伴侣</div>
						<p style="width:500px;font-size:14px;">找到你家的小区邻居、亲友家庭，关注他们的动态；得到家庭服务、育儿教育、实用程序；组建家庭圈子、共同活动、结伴出行，快乐生活。 </p>
						<!-- 
						<div class="index_img">
							<a href="#"><img src="images/m_06.jpg" border="0" />
							</a>
						</div>
						<div class="index_dt">
							<div class="hdxx">
								<span class="hd_id">名言:</span>
								好好活，好好活就是做许多有意义的事！
							</div>
	
							<div class="hdsj">大约2分钟前</div>
						</div>
						 -->
						<div class="clear"></div>
					</div>
					<div class="index_dl">
						<form id="loginForm" action="login.ajax" method="post" onsubmit="return submitJames()">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td height="50" colspan="2" valign="top"><img
										src="images/ggj_06.jpg" width="214" height="44" />
										<br><div id="loginError" style="color: red; font-size: 12px;">${requestScope.loginError }</div>
									</td>
								</tr>
								<tr>
									<td width="30%" align="right" class="font14">门牌（帐号）：</td>
									<td width="70%"><input class="james" onfocus="laiLe()" onblur="zouBa()" value="用门牌号/邮箱登录" type="text" id="loginName" name="loginName"/>
									</td>
								</tr>
								<tr>
									<td align="right" class="font14">钥匙（密码）：</td>
									<td><input class="inputText" type="password" onfocus="select()" id="loginPwd" name="loginPwd"/>
									</td>
								</tr>
								<%-- 
								<tr>
									<td height="20">&nbsp;</td>
									<td><table width="100%" border="0" cellspacing="0"
											cellpadding="0">
											<tr>
												<td width="8%"><input type="checkbox" name="checkbox"
													id="checkbox" />
												</td>
												<td width="42%" class="font13"><span onclick="lianXuan()" style="cursor: pointer;">一个月内自动登入</span></td>
												<td width="50%" class="font13"><a href="#">忘记密码</a>
												</td>
											</tr>
										</table>
										</td>
								</tr>
								--%>
								<tr>
									<td>&nbsp;</td>
									<td height="60">
										<input id="login_login_button" type="submit" style="background-image: url('images/enter.jpg');width: 99px;height: 39px;border: 0; cursor: pointer;" value=""/>
										<input  type="button" style="background-image: url('images/up.jpg');margin-right:5px;width: 99px;height: 39px;border: 0; cursor: pointer;"  id="createHome"/>
									</td>
								</tr>
							</table>
						</form>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</div>
	<%-- 尾部 --%>
	<div class="foot">
	<div class="w960" ><%@include file="../common/footer.jsp"%></div>
	</div>
</body>
</html>